
<template>
<div class="box">
    <div class="bg"></div>
    <van-nav-bar id="van-bar" :title="title" fixed :border="border" left-arrow @click-left="onClickLeft">
            <template #left>
                <img :style="{width:widthPx,height:heightPx}" src="@/assets/iconPerfectInformation/nav_back@2x.png" />
            </template>
        </van-nav-bar>
        <div  :style="'margin-top:'+(topheight)+'px;height:calc(100vh - '+topheight+'px);overflow:auto;'">
          <div class="xieyi">
            <iframe name="web" :style="'height:calc(100vh - '+topheight+'px);overflow:auto;'" width="104%" frameborder=0 :src="href" id="web" onload="this.height=web.document.body.scrollHeight+20"></iframe>
         <!-- <iframe id="iframeID" width="100%" height="100%" frameborder="0" scrolling="no" src="" ></iframe> -->
          </div>
       </div>
   
  </div>
 
</template>

<script>
import { getxieyi} from "@/api/index"
export default {
  data(){
      return{
        border:'',
        widthPx:'28px',
        heightPx:'28px',
        topheight:0,
        title:'协议',
        data:{type:''},
        href:""

      }
    },
    mounted(){
      this.topheight=document.getElementById("van-bar").offsetHeight
      this.getxieyi()
    },
   
    methods:{
      onClickLeft(){
        this.$router.back()
      },
     getxieyi(){
        if(this.$route.query.num==1){
         this.href=JSON.parse(localStorage.getItem('hello-vuex-along')).root.siteConfig.information_collection
         this.title='个人信息采集说明'
        }else  if(this.$route.query.num==2){
         this.href=JSON.parse(localStorage.getItem('hello-vuex-along')).root.siteConfig.third_description
         this.title='第三方SDK说明'

        } if(this.$route.query.num==3){
         this.href=JSON.parse(localStorage.getItem('hello-vuex-along')).root.siteConfig.user_privacy
         this.title='用户隐私协议'
        } if(this.$route.query.num==4){
         this.href=JSON.parse(localStorage.getItem('hello-vuex-along')).root.siteConfig.user_services
         this.title='用户服务协议'
        } if(this.$route.query.num==5){
         this.href=JSON.parse(localStorage.getItem('hello-vuex-along')).root.siteConfig.release_notes
         this.title='内容发布须知'
        }
         

      }
    }
}
</script>

<style  scoped>

.xieyi{
  width: 100%;
  height: auto;
font-size: 14px;

font-weight: 400;
color: #3D3D3D;
line-height: 20px;
margin: 0 auto;
}
 .van-cell::after{
    border-color: #D8D8D8;
}
.van-cell__value{
    color: #1A1A1A;
    font-weight: 500;
}
</style>